# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
pkgname=cargo-crev
pkgver=0.25.5
pkgrel=0
pkgdesc="Cryptographically verifiable code review system for cargo"
url="https://github.com/crev-dev/cargo-crev"
# s390x: failing tests
arch="all !s390x"
license="MPL-2.0 OR MIT OR Apache-2.0"
makedepends="cargo cargo-auditable openssl-dev"
source="https://github.com/crev-dev/cargo-crev/archive/v$pkgver/cargo-crev-$pkgver.tar.gz
	use-index-guix-from-crates.io.patch
	"

export OPENSSL_NO_VENDOR=1

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release -p cargo-crev --no-default-features
}

check() {
	cargo test --frozen --no-default-features
}

package() {
	install -Dm755 target/release/cargo-crev "$pkgdir"/usr/bin/cargo-crev
}

sha512sums="
621447b0f5e32ed11af3d4e985d77986e94ceb6d6e0359880e70c20120698fb685b64062824fbd0bfffd9de565a6d5894788996c74637444d7bbdb47ed8e3807  cargo-crev-0.25.5.tar.gz
84123bf4c1f1dfcb4dc1e5b31f5b5351a21cf24a56a8b0e07bffce00b5c0170f373dbb1d3d293beff4cc3f4873e831f9967da872f7408cf491f8926b1cc717c0  use-index-guix-from-crates.io.patch
"
